package hsh.machine.components;

import hsh.machine.instructions.Instruction;

public class Bus {
	private PrimaryMemory primaryMemory;
	private SecondaryMemory secondaryMemory;
	private Processor processor;
	
	
	public Bus(PrimaryMemory primaryMemory, SecondaryMemory secondaryMemory,
			Processor processor) {
		super();
		this.primaryMemory = primaryMemory;
		this.secondaryMemory = secondaryMemory;
		this.processor = processor;
	}


	public Instruction readPrimaryMemory(int position) throws Exception{
		return primaryMemory.loadInstruction(position);
	}
}
